<style type="text/css">
    span{
        color:red;
    }
</style>

<div class="task1">
    <?php
    $textarea = array('name' => 'txt_description', 'rows' => '8', 'cols' => '50');
    echo form_open('product/edit/' . $this->uri->segment('3'));
    foreach ($getresult->result() as $rows) {
        echo '<div class="form-wrapper">';
        echo '<fieldset style="margin: 0 auto;width:60%;height: auto;border: 1px #ccc solid; padding:20px 15px 20px 15px;-moz-border-radius:10px;">';
        echo '<legend align="center"><div class="heading" style="margin: 0 auto;width: 100%;height: auto;border: 0px #ccc solid;text-align: center;font-size: 20px;color:#006600;">Edit product</div></legend>';
        echo '<div style="float: right; border: 0px #ccc solid;">';
        echo anchor('product/manager', img('images/user_images/cancel.png'));
        echo '</div>';
        echo '<table align="center">';
        echo '<tr>';
        echo '<td>ProductName<span>*</span></td>';
        echo '<td>' . form_input('txtproduct', $rows->pro_name) . '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td>ProductPrice<span>*</span></td>';
        echo '<td>' . form_input('txtproprice', $rows->pro_price) . '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td>ProductQuantity<span>*</span></td>';
        echo '<td>' . form_input('txtqauntity', $rows->pro_quantity) . '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<tr>';
        echo '<td>ProductType<span>*</span></td>';
        echo '<td>';
        $select = '<select name="txt_select">';
        $this->db->select('*');
        $datacat = $this->db->get('tbl_pro_type');
        foreach ($datacat->result() as $row) {
            $sel_re = ($rows->pro_type_id == $row->pro_type_id) ? ' selected="selected"' : '';
            $select .= '<option value="' . $row->pro_type_id . '"' . $sel_re . '>' . $row->pro_type_name . '</option>';
        }
        $select .= '</select>';

        echo $select;
        echo '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td>Detail &nbsp;</td>';
        echo '<td> ' . form_textarea(array('name' => 'txtarea', 'rows' => '8', 'cols' => '50', 'value' => $row->pro_type_des)) . '</td>';
        echo '</tr>';
        echo '<tr>';
        echo '<td></td>';
        echo '<td>' . form_submit('btn_submit', 'Update') . form_reset('btn_reset', 'Reset') . '</td>';
//echo '<td>'.form_submit('btn_Cancel','Cancel').'</td>';
        echo '</tr>';

        echo '</table>';
        echo '</fieldset>';
        echo '</div>';
    }
    echo form_close();
    ?>
</div>